package edu.uts.reekie.designer.model.commands;

import edu.uts.reekie.designer.Messages;
import edu.uts.reekie.designer.model.AbstractDiagram;
import edu.uts.reekie.designer.model.Multiple;
import edu.uts.reekie.designer.model.ViewNode;

public class ToggleMultiplicityCommand extends
	org.eclipse.gef.commands.Command
{

private Multiple target;
private boolean originalValue;


public ToggleMultiplicityCommand() {
	super("Toggle multiplicity");
}

public void execute() {
	target.setMultiple(!originalValue);
	
}

public void redo() {
	target.setMultiple(!originalValue);
}

public void setTarget(Multiple t) {
	target = t;
	originalValue =t.isMultiple();
}

public void undo() {
	target.setMultiple(originalValue);
}





}
